package com.yunli.mall.common.exception;

/**
 * @author wangyue
 * @description
 * @date 2019-10-16 10:17
 */
public enum ErrorCode implements ErrorDescription {
    /**
     *
     */
    PARAM_ERROR(100, "请求参数错误"),
    INTERNAL_ERROR(101, "内部错误"),
    SERVICE_UNAVAILABLE(102, "服务不可用"),
    HTTP_REQUEST_TIME_OUT(103, "服务请求超时"),
    DATA_NOT_EXIST(104, "数据不存在"),
    TOKEN_NOT_EXIST(105, "登录过期"),
    SERVICE_NAME_NOT_SPECIFIED(106, "未配置服务"),
    SERVICE_IMPL_NOT_SPECIFIED(107, "未配置服务实现"),
    SERVICE_IMPL_NOT_FOUND(108, "未找到服务实现"),
    INTERNAL_ERROR_HIDE_MSG(109, "内部错误"),
    ;

    private final Integer code;
    private final String message;

    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }

}
